package com.wasu.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.wasu.jopo.User;
import com.wasu.service.UserService;

import lombok.extern.slf4j.Slf4j;

@RestController
@Slf4j
public class UserController {
	
	@Autowired
	private UserService userService;
	
	@RequestMapping(value = "findUserById/{id}", method = RequestMethod.GET)
	public User findUserById(@PathVariable("id") Integer id) {
		log.info("根据 id: " + id + " 查询用户信息");
		User user = userService.findUserById(id);
		return user;
	}
	
}
